<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="ca.concordia.soen6461.wichf.navigation.common.Payment" %>
<%@ page import="ca.concordia.soen6461.wichf.navigation.view.CartView" %>
<% Payment view = (Payment) request.getAttribute("view"); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style>
body
{
background-color:#CCCCCC;
}
h1
{
color:Red;
text-align:center;
}
</style>
</head>
<body>
<jsp:include page="/header.jsp"></jsp:include>
<a href="?event=HomeEvent">Home</a>
<h1>Confirmation / Receipt</h1>
<table align=center cellpadding=5 cellspacing=0 bgcolor="#D5FFD5">

<tr>
<td>Type Of Appointment</td>

<td>Date</td>

<td>Amount</td>

</tr>
<%
  for(int i=0; i < view.getAppointments().size(); i++) {
    CartView.Appointment appointment = view.getAppointments().get(i);
%>
  <tr>
      <td><%=appointment.getType()%></td>
    <td><%=appointment.getDate()%></td>
      <td><%=appointment.getPrice()%></td>
    </tr>
<%
  }
%>
<tr><td></td>
<td>total :</td>
<td><%=view.getTotal()%></td>
</tr>
<tr>
<td>Card Holder's Name:</td><td><%=view.getNameOnCard()%></td>
</tr>
<tr><td>Card No:</td><td><%=view.getCreditCardNumber()%></td>
</tr>
</table>
</body>
</html>